import request from './request'
import type { Result } from './jackpot-dto'
export const UserApi = {
    login(params: { username: string, password: string }): Promise<Result<any>> {
        return request.post('/auth/login', params)
    },
    register(params: { username: string, password: string }): Promise<Result<any>> {
        return request.post('/auth/register', params)
    },
    getJackpotUserInfo(): Promise<Result<any>> {
        return request.get('/jackpot/getJackpotGameUserInfo')
    },

    // getUserInfo: () => {
    //     return fetch('http://8.153.175.159/api/user/getUserInfo',
    //         {
    //             method: 'GET',
    //             headers: {
    //                 'Content-Type': 'application/json',
    //                 'Authorization': `Bearer ${getToken()}`
    //             },
    //         }
    //     ).then(res => res.json())
    //         .catch(err => {
    //             console.log(err)
    //         })
    // },

}
